import instance from '../utils/request'

const getArticle = ({ id }) => {
  return instance({
    method: 'get',
    url: '/v1_0/articles/' + id
  })
}

const followUser = ({ target }) => {
  return instance({
    method: 'post',
    url: '/v1_0/user/followings',
    data: {
      target
    }
  })
}

const unFollowUser = ({ target }) => {
  return instance({
    method: 'delete',
    url: '/v1_0/user/followings/' + target
  })
}

export { getArticle, followUser, unFollowUser }
